package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.util.List;

@TableName("t_product")
public class ProductBean {
    @TableId(value = "pk_productId",type = IdType.AUTO)
    private Integer id;
    @TableField("p_name")
    private String name;
    @TableField("p_price")
    private Integer price;
    @TableField("p_image")
    private String image;
    @TableField(exist = false)
    private List<ProductBean> comList;
    @TableField(exist = false)
    private Integer comNum;

    public ProductBean() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getPrice() {
        return price;
    }

    public void setPrice(Integer price) {
        this.price = price;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public List<ProductBean> getComList() {
        return comList;
    }

    public void setComList(List<ProductBean> comList) {
        this.comList = comList;
    }

    public Integer getComNum() {
        return comNum;
    }

    public void setComNum(Integer comNum) {
        this.comNum = comNum;
    }

    @Override
    public String toString() {
        return "ProductBean{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", price=" + price +
                ", image='" + image + '\'' +
                ", comList=" + comList +
                ", comNum=" + comNum +
                "}\n";
    }
}
